$(function(){
    if (/login$/.test(window.location.pathname)
        && !/login$/.test(window.parent.location.pathname) ){
        window.parent.location.href = '/login';
    }
});